package com.hainatong.shiphelper.mainhome.adapter;

import android.view.ViewGroup;
import com.chad.library.adapter.base.provider.BaseItemProvider;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.hainatong.shiphelper.R;
import com.hainatong.shiphelper.mainhome.entity.SysMsgTime;
import com.hainatong.mvvmbase.base.BaseBean;
import org.jetbrains.annotations.NotNull;

public class MsgTimeProvider extends BaseItemProvider<BaseBean>
{

    @Override
    public int getItemViewType()
    {
        return SysMsgItemType.MSG_TIME_VIEW;
    }

    @Override
    public int getLayoutId()
    {
        return R.layout.item_sys_msg_time;
    }

    @Override
    public void onViewHolderCreated(@NotNull BaseViewHolder viewHolder, int viewType)
    {

    }

    @NotNull
    @Override
    public BaseViewHolder onCreateViewHolder(@NotNull ViewGroup parent, int viewType)
    {

        //BaseDataBindingHolder<>
        return super.onCreateViewHolder(parent, viewType);
    }

    @Override
    public void convert(@NotNull BaseViewHolder baseViewHolder, BaseBean baseBean)
    {
        baseViewHolder.setText(R.id.tv_msg_time , ((SysMsgTime) baseBean).getTime() );
        /*
     ItemSysMsgTimeBinding binding = baseViewHolder.getBinding();
     if( baseBean == null)
     {
        return;
     }
     if( binding != null )
     {
         binding.setSysMsgTime((SysMsgTime) baseBean);
         binding.executePendingBindings();
     }
     */
    }
}
